Metaprogramming Elixir by Chris McCord
Author:Chris McCord
Language: eng
Format: epub, pdf
Tags: Pragmatic Bookshelf
ISBN: 978-1-68050-041-7
Publisher: The Pragmatic Bookshelf, LLC
- @locales {name, mappings}
- end
20 end
-
- def compile(translations) do
- # TBD: Return AST for all translation function definitions
- end
25 end
Just like our accumulated @tests attribute in our Assertion module from the code, we registered an accumulated @locales attribute on line 5. Next, we wired up the __before_compile__ hook in our Translator.__using__ macro. On line 13, we added a placeholder to delegate to a compile function to carry out the code generation from our locale registrations, but we left the compile implementation for a later step. Finally, we defined our locale macro that will register a locale name and list of translations to be used by compile in our __before_compile__ hook.
With the accumulated attribute registrations wired up, we have all the necessary information to produce an AST of t/3 function definitions. If you like recursion, you’re in for a treat. If not, pay attention and we’ll break it down.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Coding Theory | Localization |
Logic | Object-Oriented Design |
Performance Optimization | Quality Control |
Reengineering | Robohelp |
Software Development | Software Reuse |
Structured Design | Testing |
Tools | UML |
Deep Learning with Python by François Chollet(12526)
Hello! Python by Anthony Briggs(9871)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9761)
The Mikado Method by Ola Ellnestam Daniel Brolund(9752)
Dependency Injection in .NET by Mark Seemann(9297)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8262)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7745)
Grails in Action by Glen Smith Peter Ledbrook(7671)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7521)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(6757)
Microservices with Go by Alexander Shuiskov(6524)
Practical Design Patterns for Java Developers by Miroslav Wengner(6422)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6400)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6383)
Angular Projects - Third Edition by Aristeidis Bampakos(5782)
The Art of Crafting User Stories by The Art of Crafting User Stories(5310)
NetSuite for Consultants - Second Edition by Peter Ries(5252)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5073)
Kotlin in Action by Dmitry Jemerov(5023)
